<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Library Evolutionary Algorithms for Clustering (LEAC): include_inout/runtime_statistic.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="leac_logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Library Evolutionary Algorithms for Clustering (LEAC)
   &#160;<span id="projectnumber">Version 1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_6811ab4d66cfcd0145286a7c6e46fe51.html">include_inout</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">runtime_statistic.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="runtime__statistic_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#ifndef __RUNTIME_STATISTIC_HPP</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#define __RUNTIME_STATISTIC_HPP</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &lt;algorithm&gt;</span>    <span class="comment">// std::min_element, std::max_element</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="runtime__function__value_8hpp.html">runtime_function_value.hpp</a>&quot;</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="keyword">namespace  </span><a class="code" href="namespaceruntime.html">runtime</a> {</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;  </div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;  </div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="runtime__statistic_8hpp.html#a821c6beac41497051d4d05d51f4ae4d7">   31</a></span>&#160;<span class="preprocessor">#define STATISTICAL_ALL_MEASURES 6 </span></div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="runtime__statistic_8hpp.html#ad0d4117dd1c60d6ad38429af6fbea788">   32</a></span>&#160;<span class="preprocessor">#define STATISTICAL_MINIMUM  0</span></div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="runtime__statistic_8hpp.html#a526b2895f2cff446a66c6bb6d0051b3e">   33</a></span>&#160;<span class="preprocessor">#define STATISTICAL_MAXIMUM  1</span></div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="runtime__statistic_8hpp.html#ac6fc32c99bcde115ddcd3c94b6930fc0">   34</a></span>&#160;<span class="preprocessor">#define STATISTICAL_AVERAGE  2</span></div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="runtime__statistic_8hpp.html#a192823c31b50f6126157a3a924240b9c">   35</a></span>&#160;<span class="preprocessor">#define STATISTICAL_SUM      3</span></div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="runtime__statistic_8hpp.html#a20ad457df7230c261ba404942171de02">   36</a></span>&#160;<span class="preprocessor">#define STATISTICAL_VARIANCE 4</span></div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="runtime__statistic_8hpp.html#aefb9f838bc38c86cf0cfee58c30a342a">   37</a></span>&#160;<span class="preprocessor">#define STATISTICAL_STD_DEVIATION 5</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="namespaceruntime.html#a75536c78c5dc21f65db934a332dda25f">   39</a></span>&#160;<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="namespaceruntime.html#a75536c78c5dc21f65db934a332dda25f">statistical_name</a>[] = {<span class="stringliteral">&quot;Min&quot;</span>, <span class="stringliteral">&quot;Max&quot;</span>, <span class="stringliteral">&quot;Avg&quot;</span>, <span class="stringliteral">&quot;Sum&quot;</span>,  <span class="stringliteral">&quot;Var&quot;</span>, <span class="stringliteral">&quot;StdD&quot;</span>};</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">class</span> T_VALUE&gt;</div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="classruntime_1_1_runtime_function_stat.html">   45</a></span>&#160;<span class="keyword">class </span><a class="code" href="classruntime_1_1_runtime_function_stat.html">RuntimeFunctionStat</a>:</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;  <span class="keyword">public</span> <a class="code" href="classruntime_1_1_runtime_function_value.html">RuntimeFunctionValue</a>&lt;T_VALUE&gt; </div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;{</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;  <a class="code" href="classruntime_1_1_runtime_function_stat.html#a2a51b4daefffa78c78f98263688732d9">RuntimeFunctionStat</a></div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="classruntime_1_1_runtime_function_stat.html#a2a51b4daefffa78c78f98263688732d9">   50</a></span>&#160;  (<span class="keyword">const</span> <span class="keywordtype">char</span>         aic_idStatistical, </div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;   <span class="keyword">const</span> std::string&amp; ais_algorithmoName, </div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;   <span class="keywordtype">char</span>               aic_typeFunc</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;   ): <a class="code" href="classruntime_1_1_runtime_function_value.html">RuntimeFunctionValue&lt;T_VALUE&gt;</a></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;      (<a class="code" href="namespaceruntime.html#a75536c78c5dc21f65db934a332dda25f">statistical_name</a>[(<span class="keywordtype">int</span>) aic_idStatistical], ais_algorithmoName,aic_typeFunc)</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    , <a class="code" href="classruntime_1_1_runtime_function_stat.html#a952bcf5083e7f207dd983b868d70652d">c_idStatistical</a>(aic_idStatistical)</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;  { }</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="classruntime_1_1_runtime_function_stat.html#a7e6ac90d008eab4999733672b7bc45a5">   58</a></span>&#160;  <span class="keyword">virtual</span> <a class="code" href="classruntime_1_1_runtime_function_stat.html#a7e6ac90d008eab4999733672b7bc45a5">~RuntimeFunctionStat</a>() {}</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="classruntime_1_1_runtime_function_stat.html#a1df5d21cc9c918ac930e79c133002a53">   60</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classruntime_1_1_runtime_function_stat.html#a1df5d21cc9c918ac930e79c133002a53">evaluate</a>(std::vector&lt;T_VALUE&gt; &amp;aivectorT_data) </div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;  {</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <span class="keywordflow">switch</span> (this-&gt;<a class="code" href="classruntime_1_1_runtime_function_stat.html#a952bcf5083e7f207dd983b868d70652d">c_idStatistical</a>) {</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="runtime__statistic_8hpp.html#ad0d4117dd1c60d6ad38429af6fbea788">STATISTICAL_MINIMUM</a>:</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;      this-&gt;<a class="code" href="classruntime_1_1_runtime_function_value.html#a234c41f961edba633c1dd8304ae7f637">t_value</a> = </div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        *std::min_element(std::begin(aivectorT_data),std::end(aivectorT_data));</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;      <span class="keywordflow">break</span>;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="runtime__statistic_8hpp.html#a526b2895f2cff446a66c6bb6d0051b3e">STATISTICAL_MAXIMUM</a>:</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;      this-&gt;<a class="code" href="classruntime_1_1_runtime_function_value.html#a234c41f961edba633c1dd8304ae7f637">t_value</a> = </div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        *std::max_element(std::begin(aivectorT_data),std::end(aivectorT_data)); </div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;      <span class="keywordflow">break</span>;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="runtime__statistic_8hpp.html#ac6fc32c99bcde115ddcd3c94b6930fc0">STATISTICAL_AVERAGE</a>:</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;      this-&gt;<a class="code" href="classruntime_1_1_runtime_function_value.html#a234c41f961edba633c1dd8304ae7f637">t_value</a> = <a class="code" href="classruntime_1_1_runtime_function_stat.html#a35e34b6691d2a7a164f09f9a757f8ffd">_avg</a>(aivectorT_data);</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;      <span class="keywordflow">break</span>;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="runtime__statistic_8hpp.html#a192823c31b50f6126157a3a924240b9c">STATISTICAL_SUM</a>:</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;      this-&gt;<a class="code" href="classruntime_1_1_runtime_function_value.html#a234c41f961edba633c1dd8304ae7f637">t_value</a> = <a class="code" href="classruntime_1_1_runtime_function_stat.html#a9bee34a93ac9b17526be2d50664f35c4">_sum</a>(aivectorT_data);</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;      <span class="keywordflow">break</span>;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="runtime__statistic_8hpp.html#a20ad457df7230c261ba404942171de02">STATISTICAL_VARIANCE</a>:</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;      this-&gt;<a class="code" href="classruntime_1_1_runtime_function_value.html#a234c41f961edba633c1dd8304ae7f637">t_value</a> = <a class="code" href="classruntime_1_1_runtime_function_stat.html#aaedb87785d4b040e89f2bb55420ebf15">_var</a>(aivectorT_data);</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;      <span class="keywordflow">break</span>;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="runtime__statistic_8hpp.html#aefb9f838bc38c86cf0cfee58c30a342a">STATISTICAL_STD_DEVIATION</a>:</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;      this-&gt;<a class="code" href="classruntime_1_1_runtime_function_value.html#a234c41f961edba633c1dd8304ae7f637">t_value</a> = <a class="code" href="classruntime_1_1_runtime_function_stat.html#aad475aabfa66179c6b67e0ef42ce5f1f">_devstd</a>(aivectorT_data);</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;      <span class="keywordflow">break</span>;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <span class="keywordflow">default</span>:</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;      <span class="keywordflow">break</span>;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    }</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;  }</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;  </div><div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="classruntime_1_1_runtime_function_stat.html#a9bee34a93ac9b17526be2d50664f35c4">   89</a></span>&#160;  T_VALUE <a class="code" href="classruntime_1_1_runtime_function_stat.html#a9bee34a93ac9b17526be2d50664f35c4">_sum</a>(std::vector&lt;T_VALUE&gt; &amp;aivectorT_data)</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;  {</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="keywordflow">return</span> std::accumulate(std::begin(aivectorT_data),std::end(aivectorT_data),0);</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;  } </div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;</div><div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="classruntime_1_1_runtime_function_stat.html#a35e34b6691d2a7a164f09f9a757f8ffd">   94</a></span>&#160;  T_VALUE <a class="code" href="classruntime_1_1_runtime_function_stat.html#a35e34b6691d2a7a164f09f9a757f8ffd">_avg</a>(std::vector&lt;T_VALUE&gt; &amp;aivectorT_data)</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;  {</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <span class="keywordflow">return</span> (<a class="code" href="classruntime_1_1_runtime_function_stat.html#a9bee34a93ac9b17526be2d50664f35c4">_sum</a>(aivectorT_data) / aivectorT_data.size()); </div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;  } </div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="classruntime_1_1_runtime_function_stat.html#aaedb87785d4b040e89f2bb55420ebf15">   99</a></span>&#160;  T_VALUE <a class="code" href="classruntime_1_1_runtime_function_stat.html#aaedb87785d4b040e89f2bb55420ebf15">_var</a>(std::vector&lt;T_VALUE&gt; &amp;aivectorT_data)</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;  {</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    T_VALUE lT_avg = <a class="code" href="classruntime_1_1_runtime_function_stat.html#a35e34b6691d2a7a164f09f9a757f8ffd">_avg</a>(aivectorT_data);</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    T_VALUE lT_accum = 0.0;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    std::for_each (std::begin(aivectorT_data), std::end(aivectorT_data), [&amp;](<span class="keyword">const</span> T_VALUE liter_data) {</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        lT_accum += (liter_data - lT_avg) * (liter_data - lT_avg);</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;      });</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    <span class="keywordflow">return</span> (lT_accum / (aivectorT_data.size()- 1.0)); </div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;  } </div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="classruntime_1_1_runtime_function_stat.html#aad475aabfa66179c6b67e0ef42ce5f1f">  109</a></span>&#160;  T_VALUE <a class="code" href="classruntime_1_1_runtime_function_stat.html#aad475aabfa66179c6b67e0ef42ce5f1f">_devstd</a>(std::vector&lt;T_VALUE&gt; &amp;aivectorT_data)</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;  {</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    <span class="keywordflow">return</span> std::sqrt(<a class="code" href="classruntime_1_1_runtime_function_stat.html#aaedb87785d4b040e89f2bb55420ebf15">_var</a>(aivectorT_data));</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;  }</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="classruntime_1_1_runtime_function_stat.html#a952bcf5083e7f207dd983b868d70652d">  115</a></span>&#160;  <span class="keywordtype">int</span> <a class="code" href="classruntime_1_1_runtime_function_stat.html#a952bcf5083e7f207dd983b868d70652d">c_idStatistical</a>;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;};</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;  </div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">class</span> T_VALUE&gt;</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespaceruntime.html#a4b3214090bd4f8a54968b48ce58352ed">functionhiststat_evaluateAll</a></div><div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="namespaceruntime.html#a4b3214090bd4f8a54968b48ce58352ed">  127</a></span>&#160;(<a class="code" href="classruntime_1_1_runtime_function_stat.html">RuntimeFunctionStat&lt;T_VALUE&gt;</a>  *aofhs_statObjectiveFunc[],</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160; std::vector&lt;T_VALUE&gt;       &amp;aivectorT_data</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160; )</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;{ <span class="comment">//BEGIN functionhiststat_evaluateAll </span></div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;  aofhs_statObjectiveFunc[<a class="code" href="runtime__statistic_8hpp.html#ad0d4117dd1c60d6ad38429af6fbea788">STATISTICAL_MINIMUM</a>]-&gt;<a class="code" href="classruntime_1_1_runtime_function_value.html#ac2b3712c5f0ce97aa2c58016cc9ad986">setValue</a></div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    (*std::min_element(std::begin(aivectorT_data),std::end(aivectorT_data)));</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;  aofhs_statObjectiveFunc[<a class="code" href="runtime__statistic_8hpp.html#a526b2895f2cff446a66c6bb6d0051b3e">STATISTICAL_MAXIMUM</a>]-&gt;<a class="code" href="classruntime_1_1_runtime_function_value.html#ac2b3712c5f0ce97aa2c58016cc9ad986">setValue</a></div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    (*std::max_element(std::begin(aivectorT_data),std::end(aivectorT_data))); </div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;  T_VALUE lT_sum = </div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    std::accumulate(std::begin(aivectorT_data),std::end(aivectorT_data),0);</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;  aofhs_statObjectiveFunc[<a class="code" href="runtime__statistic_8hpp.html#a192823c31b50f6126157a3a924240b9c">STATISTICAL_SUM</a>]-&gt;<a class="code" href="classruntime_1_1_runtime_function_value.html#ac2b3712c5f0ce97aa2c58016cc9ad986">setValue</a>(lT_sum);</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;  T_VALUE lT_avg = lT_sum / aivectorT_data.size();</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;  aofhs_statObjectiveFunc[<a class="code" href="runtime__statistic_8hpp.html#ac6fc32c99bcde115ddcd3c94b6930fc0">STATISTICAL_AVERAGE</a>]-&gt;<a class="code" href="classruntime_1_1_runtime_function_value.html#ac2b3712c5f0ce97aa2c58016cc9ad986">setValue</a>(lT_avg);</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;  </div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;  T_VALUE lT_accum = 0.0;</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;  std::for_each</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;    (std::begin(aivectorT_data), </div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;     std::end(aivectorT_data), </div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;     [&amp;](<span class="keyword">const</span> T_VALUE liter_data) </div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;     {</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;      lT_accum += (liter_data - lT_avg) * (liter_data - lT_avg);</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;     }</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;     );</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;  T_VALUE lT_var = lT_accum / (aivectorT_data.size()- 1.0); </div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;  aofhs_statObjectiveFunc[<a class="code" href="runtime__statistic_8hpp.html#a20ad457df7230c261ba404942171de02">STATISTICAL_VARIANCE</a>]-&gt;<a class="code" href="classruntime_1_1_runtime_function_value.html#ac2b3712c5f0ce97aa2c58016cc9ad986">setValue</a>(lT_var);</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;  aofhs_statObjectiveFunc[<a class="code" href="runtime__statistic_8hpp.html#aefb9f838bc38c86cf0cfee58c30a342a">STATISTICAL_STD_DEVIATION</a>]-&gt;<a class="code" href="classruntime_1_1_runtime_function_value.html#ac2b3712c5f0ce97aa2c58016cc9ad986">setValue</a>(std::sqrt(lT_var));</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160; </div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;} <span class="comment">//ALL functionhiststat_evaluateAll </span></div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;} <span class="comment">/*END namespace runtime </span></div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;<span class="comment">   */</span></div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;  </div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/*__RUNTIME_STATISTIC_HPP*/</span><span class="preprocessor"></span></div><div class="ttc" id="classruntime_1_1_runtime_function_stat_html_a35e34b6691d2a7a164f09f9a757f8ffd"><div class="ttname"><a href="classruntime_1_1_runtime_function_stat.html#a35e34b6691d2a7a164f09f9a757f8ffd">runtime::RuntimeFunctionStat::_avg</a></div><div class="ttdeci">T_VALUE _avg(std::vector&lt; T_VALUE &gt; &amp;aivectorT_data)</div><div class="ttdef"><b>Definition:</b> <a href="runtime__statistic_8hpp_source.html#l00094">runtime_statistic.hpp:94</a></div></div>
<div class="ttc" id="classruntime_1_1_runtime_function_stat_html_aad475aabfa66179c6b67e0ef42ce5f1f"><div class="ttname"><a href="classruntime_1_1_runtime_function_stat.html#aad475aabfa66179c6b67e0ef42ce5f1f">runtime::RuntimeFunctionStat::_devstd</a></div><div class="ttdeci">T_VALUE _devstd(std::vector&lt; T_VALUE &gt; &amp;aivectorT_data)</div><div class="ttdef"><b>Definition:</b> <a href="runtime__statistic_8hpp_source.html#l00109">runtime_statistic.hpp:109</a></div></div>
<div class="ttc" id="runtime__statistic_8hpp_html_ac6fc32c99bcde115ddcd3c94b6930fc0"><div class="ttname"><a href="runtime__statistic_8hpp.html#ac6fc32c99bcde115ddcd3c94b6930fc0">STATISTICAL_AVERAGE</a></div><div class="ttdeci">#define STATISTICAL_AVERAGE</div><div class="ttdef"><b>Definition:</b> <a href="runtime__statistic_8hpp_source.html#l00034">runtime_statistic.hpp:34</a></div></div>
<div class="ttc" id="namespaceruntime_html_a4b3214090bd4f8a54968b48ce58352ed"><div class="ttname"><a href="namespaceruntime.html#a4b3214090bd4f8a54968b48ce58352ed">runtime::functionhiststat_evaluateAll</a></div><div class="ttdeci">void functionhiststat_evaluateAll(RuntimeFunctionStat&lt; T_VALUE &gt; *aofhs_statObjectiveFunc[], std::vector&lt; T_VALUE &gt; &amp;aivectorT_data)</div><div class="ttdoc">Calculate statistical for metrics in run time.</div><div class="ttdef"><b>Definition:</b> <a href="runtime__statistic_8hpp_source.html#l00127">runtime_statistic.hpp:127</a></div></div>
<div class="ttc" id="classruntime_1_1_runtime_function_stat_html_aaedb87785d4b040e89f2bb55420ebf15"><div class="ttname"><a href="classruntime_1_1_runtime_function_stat.html#aaedb87785d4b040e89f2bb55420ebf15">runtime::RuntimeFunctionStat::_var</a></div><div class="ttdeci">T_VALUE _var(std::vector&lt; T_VALUE &gt; &amp;aivectorT_data)</div><div class="ttdef"><b>Definition:</b> <a href="runtime__statistic_8hpp_source.html#l00099">runtime_statistic.hpp:99</a></div></div>
<div class="ttc" id="runtime__statistic_8hpp_html_aefb9f838bc38c86cf0cfee58c30a342a"><div class="ttname"><a href="runtime__statistic_8hpp.html#aefb9f838bc38c86cf0cfee58c30a342a">STATISTICAL_STD_DEVIATION</a></div><div class="ttdeci">#define STATISTICAL_STD_DEVIATION</div><div class="ttdef"><b>Definition:</b> <a href="runtime__statistic_8hpp_source.html#l00037">runtime_statistic.hpp:37</a></div></div>
<div class="ttc" id="classruntime_1_1_runtime_function_stat_html_a9bee34a93ac9b17526be2d50664f35c4"><div class="ttname"><a href="classruntime_1_1_runtime_function_stat.html#a9bee34a93ac9b17526be2d50664f35c4">runtime::RuntimeFunctionStat::_sum</a></div><div class="ttdeci">T_VALUE _sum(std::vector&lt; T_VALUE &gt; &amp;aivectorT_data)</div><div class="ttdef"><b>Definition:</b> <a href="runtime__statistic_8hpp_source.html#l00089">runtime_statistic.hpp:89</a></div></div>
<div class="ttc" id="runtime__statistic_8hpp_html_ad0d4117dd1c60d6ad38429af6fbea788"><div class="ttname"><a href="runtime__statistic_8hpp.html#ad0d4117dd1c60d6ad38429af6fbea788">STATISTICAL_MINIMUM</a></div><div class="ttdeci">#define STATISTICAL_MINIMUM</div><div class="ttdef"><b>Definition:</b> <a href="runtime__statistic_8hpp_source.html#l00032">runtime_statistic.hpp:32</a></div></div>
<div class="ttc" id="classruntime_1_1_runtime_function_stat_html_a1df5d21cc9c918ac930e79c133002a53"><div class="ttname"><a href="classruntime_1_1_runtime_function_stat.html#a1df5d21cc9c918ac930e79c133002a53">runtime::RuntimeFunctionStat::evaluate</a></div><div class="ttdeci">void evaluate(std::vector&lt; T_VALUE &gt; &amp;aivectorT_data)</div><div class="ttdef"><b>Definition:</b> <a href="runtime__statistic_8hpp_source.html#l00060">runtime_statistic.hpp:60</a></div></div>
<div class="ttc" id="runtime__function__value_8hpp_html"><div class="ttname"><a href="runtime__function__value_8hpp.html">runtime_function_value.hpp</a></div><div class="ttdoc">runtime function value</div></div>
<div class="ttc" id="classruntime_1_1_runtime_function_stat_html_a952bcf5083e7f207dd983b868d70652d"><div class="ttname"><a href="classruntime_1_1_runtime_function_stat.html#a952bcf5083e7f207dd983b868d70652d">runtime::RuntimeFunctionStat::c_idStatistical</a></div><div class="ttdeci">int c_idStatistical</div><div class="ttdef"><b>Definition:</b> <a href="runtime__statistic_8hpp_source.html#l00115">runtime_statistic.hpp:115</a></div></div>
<div class="ttc" id="namespaceruntime_html"><div class="ttname"><a href="namespaceruntime.html">runtime</a></div><div class="ttdoc">Module for obtaining run-time statistics.</div></div>
<div class="ttc" id="runtime__statistic_8hpp_html_a192823c31b50f6126157a3a924240b9c"><div class="ttname"><a href="runtime__statistic_8hpp.html#a192823c31b50f6126157a3a924240b9c">STATISTICAL_SUM</a></div><div class="ttdeci">#define STATISTICAL_SUM</div><div class="ttdef"><b>Definition:</b> <a href="runtime__statistic_8hpp_source.html#l00035">runtime_statistic.hpp:35</a></div></div>
<div class="ttc" id="runtime__statistic_8hpp_html_a20ad457df7230c261ba404942171de02"><div class="ttname"><a href="runtime__statistic_8hpp.html#a20ad457df7230c261ba404942171de02">STATISTICAL_VARIANCE</a></div><div class="ttdeci">#define STATISTICAL_VARIANCE</div><div class="ttdef"><b>Definition:</b> <a href="runtime__statistic_8hpp_source.html#l00036">runtime_statistic.hpp:36</a></div></div>
<div class="ttc" id="classruntime_1_1_runtime_function_stat_html"><div class="ttname"><a href="classruntime_1_1_runtime_function_stat.html">runtime::RuntimeFunctionStat</a></div><div class="ttdoc">Function statistical for metrics in run time.</div><div class="ttdef"><b>Definition:</b> <a href="runtime__statistic_8hpp_source.html#l00045">runtime_statistic.hpp:45</a></div></div>
<div class="ttc" id="classruntime_1_1_runtime_function_value_html"><div class="ttname"><a href="classruntime_1_1_runtime_function_value.html">runtime::RuntimeFunctionValue</a></div><div class="ttdoc">Function store metrics in run time.</div><div class="ttdef"><b>Definition:</b> <a href="runtime__function__value_8hpp_source.html#l00032">runtime_function_value.hpp:32</a></div></div>
<div class="ttc" id="namespaceruntime_html_a75536c78c5dc21f65db934a332dda25f"><div class="ttname"><a href="namespaceruntime.html#a75536c78c5dc21f65db934a332dda25f">runtime::statistical_name</a></div><div class="ttdeci">const char * statistical_name[]</div><div class="ttdef"><b>Definition:</b> <a href="runtime__statistic_8hpp_source.html#l00039">runtime_statistic.hpp:39</a></div></div>
<div class="ttc" id="classruntime_1_1_runtime_function_stat_html_a7e6ac90d008eab4999733672b7bc45a5"><div class="ttname"><a href="classruntime_1_1_runtime_function_stat.html#a7e6ac90d008eab4999733672b7bc45a5">runtime::RuntimeFunctionStat::~RuntimeFunctionStat</a></div><div class="ttdeci">virtual ~RuntimeFunctionStat()</div><div class="ttdef"><b>Definition:</b> <a href="runtime__statistic_8hpp_source.html#l00058">runtime_statistic.hpp:58</a></div></div>
<div class="ttc" id="runtime__statistic_8hpp_html_a526b2895f2cff446a66c6bb6d0051b3e"><div class="ttname"><a href="runtime__statistic_8hpp.html#a526b2895f2cff446a66c6bb6d0051b3e">STATISTICAL_MAXIMUM</a></div><div class="ttdeci">#define STATISTICAL_MAXIMUM</div><div class="ttdef"><b>Definition:</b> <a href="runtime__statistic_8hpp_source.html#l00033">runtime_statistic.hpp:33</a></div></div>
<div class="ttc" id="classruntime_1_1_runtime_function_value_html_a234c41f961edba633c1dd8304ae7f637"><div class="ttname"><a href="classruntime_1_1_runtime_function_value.html#a234c41f961edba633c1dd8304ae7f637">runtime::RuntimeFunctionValue::t_value</a></div><div class="ttdeci">T_VALUE t_value</div><div class="ttdef"><b>Definition:</b> <a href="runtime__function__value_8hpp_source.html#l00063">runtime_function_value.hpp:63</a></div></div>
<div class="ttc" id="classruntime_1_1_runtime_function_stat_html_a2a51b4daefffa78c78f98263688732d9"><div class="ttname"><a href="classruntime_1_1_runtime_function_stat.html#a2a51b4daefffa78c78f98263688732d9">runtime::RuntimeFunctionStat::RuntimeFunctionStat</a></div><div class="ttdeci">RuntimeFunctionStat(const char aic_idStatistical, const std::string &amp;ais_algorithmoName, char aic_typeFunc)</div><div class="ttdef"><b>Definition:</b> <a href="runtime__statistic_8hpp_source.html#l00050">runtime_statistic.hpp:50</a></div></div>
<div class="ttc" id="classruntime_1_1_runtime_function_value_html_ac2b3712c5f0ce97aa2c58016cc9ad986"><div class="ttname"><a href="classruntime_1_1_runtime_function_value.html#ac2b3712c5f0ce97aa2c58016cc9ad986">runtime::RuntimeFunctionValue::setValue</a></div><div class="ttdeci">void setValue(T_VALUE aiT_value)</div><div class="ttdef"><b>Definition:</b> <a href="runtime__function__value_8hpp_source.html#l00046">runtime_function_value.hpp:46</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 19 2019 08:58:32 for Library Evolutionary Algorithms for Clustering (LEAC) by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
